package state

type Exception int

const (
	Fail         Exception = iota //0
	Success                       //1
	ServerBusy                    //2
	NoToken                       //3
	InvalidToken                  //4
	ExpiredToken                  //5
)

func (s Exception) String() string {
	switch s {
	case Fail:
		return "失败"
	case Success:
		return "成功"
	case ServerBusy:
		return "网络开了个小差请稍后再试"
	case NoToken:
		return "未携带令牌"
	case InvalidToken:
		return "无效的令牌"
	case ExpiredToken:
		return "过期的令牌"
	default:
		return "未知错误"
	}
}
